import React, { Component } from 'react'
import { hashHistory } from 'react-router'
import { Icon, InputItem, Picker, List } from 'antd-mobile'
import { createForm } from 'rc-form'
import { NavHeader } from '../common'

class Withdraw extends Component {
  render() {
    const { form: { getFieldProps } } = this.props
    return (
      <div className={`rt-withdraw-container cm-column-flex-box`}>
        <NavHeader title="提现" onClick={() => hashHistory.goBack()} />
        <div className={`-message`}>
          提现时间为工作日8点至次日6点，提示：200元以下，手续费2元；200元以上，手续费为提现额的1%。
        </div>
        <p className={`-money`}>可提现金额：3,686.90元</p>
        <div className={`cm-scrollable-container`}>
          <InputItem
            className={`cm-input-item`}
            placeholder="请输入提现金额"
            extra="元"
          />

          <Picker
            data={[]}
            cols={1}
            extra="选择会员单位"
            {...getFieldProps('memberArr')}
          >
            <List.Item
              className={`cm-picker-box`}
              onClick={() => console.log('todo')}
            >
              <Icon type="caret-down" />
            </List.Item>
          </Picker>

          <InputItem
            className={`cm-input-item -margin-top`}
            placeholder="请输入交易密码"
          />

          <div className={`cm-main-button`}>提 交</div>
        </div>
      </div>
    )
  }
}

export default createForm()(Withdraw)